/**
 * copyright (c) 2021 数据牛( www.datacow.com )Inc. All rights reserved.
 * <p>
 * https://www.datacow.com
 * <p>
 * 版权所有，侵权必究！
 */

package com.datacow.modules.job.task.impl;

import com.datacow.modules.climbingdata.service.ProductHuntProcessorService;
import com.datacow.modules.job.task.ITask;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 爬虫定时任务
 *
 * climbingTask为spring bean的名称
 *
 * @author 李德森
 */
@Component("climbingTask")
public class ClimbingTask implements ITask {
    @Autowired
    private ProductHuntProcessorService productHuntProcessorService;

    private Logger logger = LoggerFactory.getLogger(getClass());

    @Override
    public void run(String params) {
        productHuntProcessorService.start(productHuntProcessorService);
        logger.debug("climbingTask定时任务正在执行，参数为：{}", params);
    }
}
